package cc.linker.steplink.crm.merchanth5.pojo;

import cc.linker.steplink.crm.commons.utils.NumberUtils;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Date;

public class MerchantOrderGoodsPo {
    @Getter
    @Setter
    private Integer isVirtual;//是否是虚拟商品
    @Getter
    @Setter
    private String goodsRemark;//商品留言
    @Getter
    @Setter
    private String couponAmount;//优惠券抵扣金额
    @Getter
    @Setter
    private Integer paymentPoints;//支付积分
    @Getter
    @Setter
    private Long goodsNum;
    @Getter
    @Setter
    private Long goodsTotalFeeCent;
    @Getter
    @Setter
    private String goodsTotalFee;
    @Getter
    @Setter
    private String freightTemplateId;
    @Getter
    @Setter
    private String author;
    @Getter
    @Setter
    private Long skuMallsAmount;
    @Getter
    @Setter
    private Long mallsGoodsId;
    @Getter
    @Setter
    private Long mallsAmount;
    @Getter
    @Setter
    private Integer malls;
    @Getter
    @Setter
    private String saler;
    @Getter
    @Setter
    private String promotion;

    @Getter
    @Setter
    private String orgId;

    @Getter
    @Setter
    private String salerId;

    @Getter
    @Setter
    private Integer goodsType;

    @Getter
    @Setter
    private Integer shippingFee;

    private String shippingFeeString;

    private Long recId;//主键ID

    public String getShippingFeeString() {
        return shippingFeeString;
    }

    public void setShippingFeeString(String shippingFeeString) {
        this.shippingFeeString = shippingFeeString;
    }

    private Long orderId;//订单ID

    private Long goodsId;//商品ID

    private Long merchantId;//商户ID

    private String goodsName;//商品名称

    private Long skuId;//sku表主键ID

    private String skuKey;//sku规格ID组合

    private String skuValue;//sku中文

    private String amount;//商品售价

    private Long amountCent;//商品售价

    private Integer goodsIntegral;//商品积分

    private Integer buyCount;//商品数量

    private String goodsCover;//商品封面

    private Short goodsReturnnum;//退货数量

    private BigDecimal refundAmount;//退款金额

    private Boolean evaluationStatus;//评价状态

    private Long evaluationTime;//评价时间

    private Double goodsPayPrice;//实际支付价格

    private Long goodsPayPriceCent;//实际支付价格

    private String buyerId;//买家用户ID

    private String customerId;//买家用户ID

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    private String gcId;//分类ID

    private Integer goodsBarternum;//换货数量

    private Integer orderGoodsType;//商品类型

    private Integer status;//状态

    private Date shippingTime;//发货时间

    public Integer getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

    private String expressName;//物流名称

    private String shippingCode;//物流单号

    private Integer refundStatus;//0未申请退款1申请退款 2等待发货 3等待收货 4拒绝收货 5同意退款 6退款成功 7退款失败

    public String getBelongId() {
        return belongId;
    }

    public void setBelongId(String belongId) {
        this.belongId = belongId;
    }

    private String belongId;//归属人id

    private Integer expressId;

    private Integer shippingType;//发货方式  无需物流  快递

    public Integer getExpressId() {
        return expressId;
    }

    public void setExpressId(Integer expressId) {
        this.expressId = expressId;
    }

    public Integer getShippingType() {
        return shippingType;
    }

    public void setShippingType(Integer shippingType) {
        this.shippingType = shippingType;
    }

    public Long getRecId() {
        return recId;
    }

    public void setRecId(Long recId) {
        this.recId = recId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getGoodsIntegral() {
        return goodsIntegral;
    }

    public void setGoodsIntegral(Integer goodsIntegral) {
        this.goodsIntegral = goodsIntegral;
    }

    public Short getGoodsReturnnum() {
        return goodsReturnnum;
    }

    public void setGoodsReturnnum(Short goodsReturnnum) {
        this.goodsReturnnum = goodsReturnnum;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public Boolean getEvaluationStatus() {
        return evaluationStatus;
    }

    public void setEvaluationStatus(Boolean evaluationStatus) {
        this.evaluationStatus = evaluationStatus;
    }

    public Long getEvaluationTime() {
        return evaluationTime;
    }

    public void setEvaluationTime(Long evaluationTime) {
        this.evaluationTime = evaluationTime;
    }

    public Double getGoodsPayPrice() {
        return goodsPayPrice;
    }

    public void setGoodsPayPrice(Double goodsPayPrice) {
        this.goodsPayPrice = goodsPayPrice;
    }

    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    public String getGcId() {
        return gcId;
    }

    public void setGcId(String gcId) {
        this.gcId = gcId;
    }

    public Integer getGoodsBarternum() {
        return goodsBarternum;
    }

    public void setGoodsBarternum(Integer goodsBarternum) {
        this.goodsBarternum = goodsBarternum;
    }

    public Integer getOrderGoodsType() {
        return orderGoodsType;
    }

    public void setOrderGoodsType(Integer orderGoodsType) {
        this.orderGoodsType = orderGoodsType;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getSkuValue() {
        return skuValue;
    }

    public void setSkuValue(String skuValue) {
        this.skuValue = skuValue;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getGoodsCover() {
        return goodsCover;
    }

    public void setGoodsCover(String goodsCover) {
        this.goodsCover = goodsCover;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getShippingTime() {
        return shippingTime;
    }

    public void setShippingTime(Date shippingTime) {
        this.shippingTime = shippingTime;
    }

    public String getExpressName() {
        return expressName;
    }

    public void setExpressName(String expressName) {
        this.expressName = expressName;
    }

    public String getShippingCode() {
        return shippingCode;
    }

    public void setShippingCode(String shippingCode) {
        this.shippingCode = shippingCode;
    }

    public Integer getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Integer buyCount) {
        this.buyCount = buyCount;
    }

    public Long getAmountCent() {
        return amountCent;
    }

    public void setAmountCent(Long amountCent) {
//        DecimalFormat df = new DecimalFormat("#.00");
//        //分转元
//        double s = ((double) amountCent / 100);
//        this.amount = Double.valueOf(df.format(s));
        this.amount = NumberUtils.fenToYuan(amountCent);
        this.amountCent = amountCent;
    }

    public Long getGoodsPayPriceCent() {
        return goodsPayPriceCent;
    }

    public void setGoodsPayPriceCent(Long goodsPayPriceCent) {
        DecimalFormat df = new DecimalFormat("#.00");
        //分转元
        if (goodsPayPriceCent == null) {
            goodsPayPriceCent = 0L;
        }
        double s = ((double) goodsPayPriceCent / 100);
        this.goodsPayPrice = Double.valueOf(df.format(s));
        this.goodsPayPriceCent = goodsPayPriceCent;
    }

    public String getSkuKey() {
        return skuKey;
    }

    public void setSkuKey(String skuKey) {
        this.skuKey = skuKey;
    }
}